{% load blog_extras %}
<form id="add_diary_form" method="POST">
	<input id="id_diary_key" name="diary_key" type="hidden" value="{{diary|id}}">
	<p>
		<select id="id_diary_category" name="diary_category" >
			{% for category in categories %}
			<option value="{{category|id}}" {% ifkeyequal category diary.category %}selected="selected"{% endifkeyequal %}>{{category.name}}</option>
			{% endfor %}
		</select>
		<input type="text" id="id_diary_title" name="diary_title" value="{{diary.title}}" size="100" />
		<input type="text" id="id_diary_tags" name="diary_tags" value="{{diary.tags}}" size="35" />
	</p>
	<p>
		<textarea id="id_diary_content" name="diary_content">{{diary.content}}</textarea>
	</p>
</form>
